diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2016-10-30 18:44:57 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2016-11-01 00:33:51 +0100 |
commit | 97c8508f5e4f57b1048830d44e76e1f4517fd449 (patch) | |
tree | 3d6af30f519a2a7788e596f21d91f3ecfa399864 /core/SCsub | |
parent | 681575fa7123592897090c6cce44402c4e45baeb (diff) |
style: Start applying PEP8 to Python files, indentation issues
Done with `autopep8 --select=E1`, fixes:
- E101 - Reindent all lines.
- E112 - Fix under-indented comments.
- E113 - Fix over-indented comments.
- E115 - Fix under-indented comments.
- E116 - Fix over-indented comments.
- E121 - Fix a badly indented line.
- E122 - Fix a badly indented line.
- E123 - Fix a badly indented line.
- E124 - Fix a badly indented line.
- E125 - Fix indentation undistinguish from the next logical line.
- E126 - Fix a badly indented line.
- E127 - Fix a badly indented line.
- E128 - Fix a badly indented line.
- E129 - Fix a badly indented line.
Diffstat (limited to 'core/SCsub')
-rw-r--r-- | core/SCsub | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/core/SCsub b/core/SCsub index cbed2e4f35..d3429c57a8 100644 --- a/core/SCsub +++ b/core/SCsub @@ -9,9 +9,9 @@ gd_call="" gd_inc="" for x in env.global_defaults: - env.core_sources.append("#platform/"+x+"/globals/global_defaults.cpp") - gd_inc+='#include "platform/'+x+'/globals/global_defaults.h"\n' - gd_call+="\tregister_"+x+"_global_defaults();\n" + env.core_sources.append("#platform/"+x+"/globals/global_defaults.cpp") + gd_inc+='#include "platform/'+x+'/globals/global_defaults.h"\n' + gd_call+="\tregister_"+x+"_global_defaults();\n" gd_cpp='#include "globals.h"\n' gd_cpp+=gd_inc @@ -24,25 +24,25 @@ f.close() import os txt = "0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0" if ("SCRIPT_AES256_ENCRYPTION_KEY" in os.environ): - e=os.environ["SCRIPT_AES256_ENCRYPTION_KEY"] - txt = "" - ec_valid=True - if (len(e)!=64): - ec_valid=False - else: - - for i in range(len(e)>>1): - if (i>0): - txt+="," - txts="0x"+e[i*2:i*2+2] - try: - int(txts,16) - except: - ec_valid=False - txt+=txts - if (not ec_valid): - txt = "0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0" - print("Invalid AES256 encryption key, not 64 bits hex: "+e) + e=os.environ["SCRIPT_AES256_ENCRYPTION_KEY"] + txt = "" + ec_valid=True + if (len(e)!=64): + ec_valid=False + else: + + for i in range(len(e)>>1): + if (i>0): + txt+="," + txts="0x"+e[i*2:i*2+2] + try: + int(txts,16) + except: + ec_valid=False + txt+=txts + if (not ec_valid): + txt = "0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0" + print("Invalid AES256 encryption key, not 64 bits hex: "+e) f = open("script_encryption_key.cpp", "wb") f.write("#include \"globals.h\"\nuint8_t script_encryption_key[32]={" + txt + "};\n") |