www.cendio.com
Bug 4919 - SyntaxError from tl-mount-ncp
: SyntaxError from tl-mount-ncp
Status: CLOSED FIXED
: ThinLinc
Misc
: 4.1.0
: PC Unknown
: P2 Normal
: 4.2.0
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2013-11-27 14:56 by
Modified: 2014-04-02 08:57 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2013-11-27 14:56:58
Reported in issue 14759:

/opt/thinlinc/bin/tl-mount-ncp:100: SyntaxWarning: name 'i1I1ii1II1iII'
is assigned to before global declaration
  global i1I1ii1II1iII

The unobfuscated version of this turns into:

./tl-mount-ncp:100: SyntaxWarning: name 'VERBOSE' is assigned to before global
declaration
  global VERBOSE

The global declaration is meaningless since the code is considered to be part
of 
the same block as the assignment of VERBOSE, at line 26.
------- Comment #2 From cendio 2013-12-12 13:47:11 -------
Fixed in r28193. Tester needs to make sure that his Python version is new
enough to detect and warn about errors like this.
------- Comment #3 From cendio 2014-03-27 09:52:34 -------
Verified that python v2.6.6 warns about the issue using following test:

VERBOSE=False
if "__main__" == __name__:
    global VERBOSE

Tested using build 4303 and it works as expected.