Skip to content

Commit

Permalink
Fix few errors
Browse files Browse the repository at this point in the history
  • Loading branch information
PazzaVlad committed Jul 22, 2017
1 parent cdf45f6 commit cc8ac94
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 118 deletions.
Binary file removed .DS_Store
Binary file not shown.
Binary file modified LinguaLeo Translate.alfredworkflow
Binary file not shown.
Binary file removed LinguaLeo-Translate/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion LinguaLeo-Translate/addtodictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
def add_to_dictionary(query):

# Check if you log in to lingualeo.com and can add words
with open('tmp/credentials', "r") as data_file:
with open('data', "r") as data_file:
auth_data = data_file.read()
if len(auth_data) < 1:
print "You are not logged in to Lingualeo! Введите команду 'llsignin'!"
Expand Down
4 changes: 2 additions & 2 deletions LinguaLeo-Translate/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ def log_in(query):
# If data are correct momorize it. If not throw an error
if not "error_code" in try_log_in:
data = email+"||"+password
with open('tmp/credentials', 'w') as database:
with open('data', 'w') as database:
database.write(base64.b64encode(data))
return "You have successfully logged in"
else:
return "Error! Cannot log in to lingualeo. Check your e-mail and password"
except Exception as e:
return "ERROR: Cannot log in or write to file"
print "ERROR: Cannot log in or write to file"
Empty file added LinguaLeo-Translate/data
Empty file.
Loading

0 comments on commit cc8ac94

Please sign in to comment.