Moar whitespace normalization [MDB IGNORE] (#7750)

Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
Drathek
2024-02-16 01:54:47 -08:00
committed by GitHub
parent eecf6bbff9
commit 3995338290
1177 changed files with 550902 additions and 550902 deletions

View File

@@ -1,39 +1,39 @@
import sys,pickle,socket, CORE_DATA
#def pack():
# path = "/home/ski/Nanotrasen/message.txt"
# ip = sys.argv[1]
# dictionary = {"ip":ip,"data":1}
# try:
# targetfile = open(path,"r")
# except IOError:
# targetfile = open(path,"w")
# pickle.dump(dictionary,targetfile)
# targetfile.close()
# nudge()
# else:
# targetfile.close() #Professionals, have standards.
# pass
def pack():
ip = sys.argv[1]
try:
data = sys.argv[2:] #The rest of the arguments is data
except:
data = "NO DATA SPECIFIED"
dictionary = {"ip":ip,"data":data}
pickled = pickle.dumps(dictionary)
nudge(pickled)
def nudge(data):
if CORE_DATA.DISABLE_ALL_NON_MANDATORY_SOCKET_CONNECTIONS:
pass
else:
HOST = "localhost"
PORT = 45678
size = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST,PORT))
s.send(data)
s.close()
if __name__ == "__main__" and len(sys.argv) > 1: # If not imported and more than one argument
pack()
import sys,pickle,socket, CORE_DATA
#def pack():
# path = "/home/ski/Nanotrasen/message.txt"
# ip = sys.argv[1]
# dictionary = {"ip":ip,"data":1}
# try:
# targetfile = open(path,"r")
# except IOError:
# targetfile = open(path,"w")
# pickle.dump(dictionary,targetfile)
# targetfile.close()
# nudge()
# else:
# targetfile.close() #Professionals, have standards.
# pass
def pack():
ip = sys.argv[1]
try:
data = sys.argv[2:] #The rest of the arguments is data
except:
data = "NO DATA SPECIFIED"
dictionary = {"ip":ip,"data":data}
pickled = pickle.dumps(dictionary)
nudge(pickled)
def nudge(data):
if CORE_DATA.DISABLE_ALL_NON_MANDATORY_SOCKET_CONNECTIONS:
pass
else:
HOST = "localhost"
PORT = 45678
size = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST,PORT))
s.send(data)
s.close()
if __name__ == "__main__" and len(sys.argv) > 1: # If not imported and more than one argument
pack()