mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-17 13:07:17 +02:00
'Refactored by Sourcery'
This commit is contained in:
parent
b2c095bbfe
commit
bcf301ff04
1 changed files with 15 additions and 30 deletions
|
|
@ -91,39 +91,24 @@ def remotegetblock():
|
|||
if os.path.isfile('pyblocksettingsClock.conf') or os.path.isfile('pyblocksettingsClock.conf'): # Check if the file 'bclock.conf' is in the same folder
|
||||
settingsv = pickle.load(open("pyblocksettingsClock.conf", "rb")) # Load the file 'bclock.conf'
|
||||
settingsClock = settingsv # Copy the variable pathv to 'path'
|
||||
b = rpc('getblockcount')
|
||||
c = str(b)
|
||||
if c > a:
|
||||
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
|
||||
print("\a" + output)
|
||||
t.sleep(10)
|
||||
break
|
||||
elif c == a:
|
||||
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
|
||||
print(output)
|
||||
t.sleep(10)
|
||||
clear()
|
||||
closed()
|
||||
else:
|
||||
break
|
||||
else:
|
||||
settingsClock = {"gradient":"", "design":"block", "colorA":"green", "colorB":"yellow"}
|
||||
pickle.dump(settingsClock, open("pyblocksettingsClock.conf", "wb"))
|
||||
b = rpc('getblockcount')
|
||||
c = str(b)
|
||||
if c > a:
|
||||
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
|
||||
print("\a" + output)
|
||||
t.sleep(10)
|
||||
break
|
||||
elif c == a:
|
||||
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
|
||||
print(output)
|
||||
t.sleep(10)
|
||||
clear()
|
||||
closed()
|
||||
else:
|
||||
break
|
||||
b = rpc('getblockcount')
|
||||
c = str(b)
|
||||
if c > a:
|
||||
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
|
||||
print("\a" + output)
|
||||
t.sleep(10)
|
||||
break
|
||||
elif c == a:
|
||||
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
|
||||
print(output)
|
||||
t.sleep(10)
|
||||
clear()
|
||||
closed()
|
||||
else:
|
||||
break
|
||||
|
||||
def countdownblockConn():
|
||||
b = rpc('getblockcount')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue