Some minor changes

This commit is contained in:
SG
2023-05-03 17:53:52 +02:00
parent 717abbc4b2
commit 26a0840ad2

View File

@@ -10,7 +10,7 @@ from progress.bar import Bar
VERSION_NUMBER="0.1.1"
SCRIPT_BASENAME = os.path.basename(sys.argv[0])
async def read_chunks(filename, chunk_size = 1024):
with open(filename, "rb") as f:
@@ -107,7 +107,7 @@ async def main():
parser.add_argument('--password', type=str, help="Specify the shared password (for --receive)")
args = parser.parse_args()
passwd_part = server_part = ""
send_part = f'{sys.argv[0]} --receive '
send_part = f'{SCRIPT_BASENAME} --receive'
if args.receive:
role = 'receive'
password = args.password
@@ -128,7 +128,7 @@ async def main():
WS_RELAY_SERVER = args.server
server_part = f'--server {WS_RELAY_SERVER}'
if args.version:
print(f"{sys.argv[0]} ver {VERSION_NUMBER}")
print(f"{SCRIPT_BASENAME} ver {VERSION_NUMBER}")
sys.exit(0)
k = derive_key_from_password(password)