[MERGED] osmo-gsm-tester[master]: fix name of local var, to not shadow 'suite' module

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon May 15 12:23:58 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: fix name of local var, to not shadow 'suite' module
......................................................................


fix name of local var, to not shadow 'suite' module

This caused "UnboundLocalError: local variable 'suite' referenced before
assignment".

Change-Id: Ic9aa383f5cdc9818c5a21b101fb6ddea4132d9fb
---
M src/osmo-gsm-tester.py
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-gsm-tester.py b/src/osmo-gsm-tester.py
index 7adb2c5..0a04708 100755
--- a/src/osmo-gsm-tester.py
+++ b/src/osmo-gsm-tester.py
@@ -67,11 +67,11 @@
 '''
 
 import sys
+import argparse
 from osmo_gsm_tester import __version__
 from osmo_gsm_tester import trial, suite, log, config
 
 def main():
-    import argparse
 
     parser = argparse.ArgumentParser(epilog=__doc__, formatter_class=argparse.RawTextHelpFormatter)
     # Note: since we're using RawTextHelpFormatter to keep nicely separate
@@ -205,8 +205,8 @@
         print('Trials failed:')
         for trial_name, suites_passed, suites_failed in trials_failed:
             print('  %s (%d of %d suite runs failed)' % (trial_name, len(suites_failed), len(suites_failed) + len(suites_passed)))
-            for suite in suites_failed:
-                print('    FAIL:', suite)
+            for suite_failed in suites_failed:
+                print('    FAIL:', suite_failed)
         exit(1)
 
 if __name__ == '__main__':

-- 
To view, visit https://gerrit.osmocom.org/2605
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9aa383f5cdc9818c5a21b101fb6ddea4132d9fb
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list