Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/2173
  
    @revans2 @harshach 
    I've just played with get_wildcard_dir() and found another issues. Please 
refer below:
    
    ```
    >>> import os
    >>> def get_wildcard_dir(path):
    ...     if os.path.isdir(path):
    ...         ret = [(os.path.join(path, "*"))]
    ...     elif os.path.exists(path):
    ...         ret = [path]
    ...     return ret
    ...
    >>> get_wildcard_dir("~/WorkArea")
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<stdin>", line 6, in get_wildcard_dir
    UnboundLocalError: local variable 'ret' referenced before assignment
    >>> get_wildcard_dir("/Users/jlim/WorkArea")
    ['/Users/jlim/WorkArea/*']
    >>> get_wildcard_dir("/Users/jlim/WorkArea/*")
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<stdin>", line 6, in get_wildcard_dir
    UnboundLocalError: local variable 'ret' referenced before assignment
    ```
    
    So `get_wildcard_dir()` just fails when a part of classpath contains not a 
dir nor a existing file. 
    IIRC we don't guide the format of `STORM_EXT_CLASSPATH` and 
`STORM_EXT_CLASSPATH_DAEMON` and then what I expect is the format of Java class 
path pattern.
    
    I'm +1 for the change. This is a bug hence actually need to port back to 
1.x version line, but it might break backward compatibility so not having 
strong opinion about back port.
    
    Maybe need to fix `get_wildcard_dir()` as well. Which value we want to 
return when it's not a dir nor an existing file? Same return value as an 
existing file? `[]` to effectively get rid of input to the classpath?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to