Get rid of the global - it's not needed any more.
authorsalimfadhley <sal@stodge.org>
Sat, 15 Jun 2013 21:33:06 +0000 (22:33 +0100)
committersalimfadhley <sal@stodge.org>
Sat, 15 Jun 2013 21:33:06 +0000 (22:33 +0100)
jenkinsapi_tests/systests/__init__.py

index 6e5691a..a5f078f 100644 (file)
@@ -1,18 +1,12 @@
 import os
 from jenkinsapi_utils.jenkins_launcher import JenkinsLancher
 
-
-launcher = None
-
+systests_dir, _ = os.path.split(__file__)
+war_path = os.path.join(systests_dir, 'jenkins.war' )
+launcher = JenkinsLancher(war_path)
 
 def setUpPackage():
-    global launcher
-
-    systests_dir, _ = os.path.split(__file__)
-    war_path = os.path.join(systests_dir, 'jenkins.war' )
-    launcher = JenkinsLancher(war_path)
     launcher.start()
 
-
 def tearDownPackage():
     launcher.stop()