Skip to content

Commit

Permalink
fix: overwrite keys-file content
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Destructive committed Jul 11, 2022
1 parent cb4997e commit 925ae53
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions crossposter/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ def main():
opt = input("Where you would like to post? (1/2/3/4) : ")

key_file = Path("keys.txt")
key_file.touch(exist_ok=True)
if key_file.is_file():

if not key_file.exists():
key_file.touch(exist_ok=True)
f = open(key_file, "r")
lines = f.readlines()
f = open(key_file, "w")
Expand Down
1 change: 0 additions & 1 deletion crossposter/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

def replace_line(file_name, line_num, text):
lines = open(file_name, "r").readlines()
print(lines)
lines[line_num] = text
out = open(file_name, "w")
out.writelines(lines)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

HERE = pathlib.Path(__file__).parent

VERSION = "0.4.1"
VERSION = "0.4.2"
PACKAGE_NAME = "crossposter"
AUTHOR = "Meet Gor"
AUTHOR_EMAIL = "[email protected]"
Expand Down

0 comments on commit 925ae53

Please sign in to comment.