diff --git a/fallout.py b/fallout.py index f7e26d8..18b30bc 100755 --- a/fallout.py +++ b/fallout.py @@ -9,13 +9,9 @@ from fallout_functions import soundTest, queueIsEmpty, addSound from time import sleep import sys -hard = False -if "--hard" in sys.argv: - hard = True +hard = "--hard" in sys.argv -skip = False -if "--skip" in sys.argv: - skip = True +skip = "--skip" in sys.argv if "--preload" in sys.argv: soundTest() diff --git a/fallout_functions.py b/fallout_functions.py index 2407bd6..ae6d1ba 100644 --- a/fallout_functions.py +++ b/fallout_functions.py @@ -27,7 +27,6 @@ _playing = False _soundQueue = [] -global _queueRunning _queueRunning = False @@ -129,7 +128,6 @@ def _playQueue(): Internal use - play sounds from a queue """ global _queueRunning - global _soundQueue if _queueRunning: return _queueRunning = True @@ -161,7 +159,6 @@ def soundTest(): addSound("poweron") addSound("poweroff") addSound("poweroff") - global _soundQueue while not queueIsEmpty(): sleep(0.2) @@ -170,7 +167,6 @@ def addSound(file): """ Add sounds to the queue """ - global _soundQueue if _soundCheck(): _soundQueue.extend([file])