Bug 4919 - SyntaxError from tl-mount-ncp
Summary: SyntaxError from tl-mount-ncp
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: 4.1.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.2.0
Assignee: Karl Mikaelsson
Keywords: hean01_tester, prosaic
Depends on:
Reported: 2013-11-27 14:56 CET by Karl Mikaelsson
Modified: 2014-04-02 08:57 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Description Karl Mikaelsson cendio 2013-11-27 14:56:58 CET
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 Karl Mikaelsson cendio 2013-12-12 13:47:11 CET
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 Henrik Andersson cendio 2014-03-27 09:52:34 CET
Verified that python v2.6.6 warns about the issue using following test:

if "__main__" == __name__:
	global VERBOSE

Tested using build 4303 and it works as expected.

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