You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Ethan Li (JIRA)" <ji...@apache.org> on 2018/11/06 16:59:00 UTC

[jira] [Closed] (STORM-3264) "local variable 'ret' referenced before assignment" in storm.py

     [ https://issues.apache.org/jira/browse/STORM-3264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ethan Li closed STORM-3264.
---------------------------
    Resolution: Fixed

> "local variable 'ret' referenced before assignment" in storm.py
> ---------------------------------------------------------------
>
>                 Key: STORM-3264
>                 URL: https://issues.apache.org/jira/browse/STORM-3264
>             Project: Apache Storm
>          Issue Type: Bug
>            Reporter: Ethan Li
>            Assignee: Ethan Li
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> In https://github.com/apache/storm/blob/master/bin/storm.py#L142
> {code:java}
> # If given path is a dir, make it a wildcard so the JVM will include all JARs in the directory.
> def get_wildcard_dir(path):
>     if os.path.isdir(path):
>         ret = [(os.path.join(path, "*"))]
>     elif os.path.exists(path):
>         ret = [path]
>     return ret
> {code}
> It's possible to get
> {code:java}
>   File "/tmp/verify-release/apache-storm-2.0.0/bin/storm.py", line 147, in get_wildcard_dir
>     return ret
> UnboundLocalError: local variable 'ret' referenced before assignment
> {code}
> because there is no "else" branch.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)