mirror of
https://github.com/caseychu/spotify-backup.git
synced 2024-05-11 10:51:31 +00:00
Use boolean toggle variable instead of comment
This commit is contained in:
@@ -111,7 +111,10 @@ class SpotifyAPI:
|
|||||||
self.access_token = access_token
|
self.access_token = access_token
|
||||||
|
|
||||||
def log(str):
|
def log(str):
|
||||||
#print('[{}] {}'.format(time.strftime('%I:%M:%S'), str).encode(sys.stdout.encoding, errors='replace'))
|
fileOutput = False #replace with the opposite value if errors occur
|
||||||
|
if not fileOutput:
|
||||||
|
print('[{}] {}'.format(time.strftime('%I:%M:%S'), str).encode(sys.stdout.encoding, errors='replace'))
|
||||||
|
else:
|
||||||
sys.stdout.buffer.write('[{}] {}\n'.format(time.strftime('%I:%M:%S'), str).encode(sys.stdout.encoding, errors='replace'))
|
sys.stdout.buffer.write('[{}] {}\n'.format(time.strftime('%I:%M:%S'), str).encode(sys.stdout.encoding, errors='replace'))
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user