From 7ca3f455845c7f717cafea676a7824a6968c02e6 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Sun, 14 Jun 2020 10:34:46 +0500 Subject: [PATCH] minor fix to gdrive backups --- plogical/IncScheduler.py | 3 + requirments.txt | 120 ++++++++++++++++++--------------------- 2 files changed, 59 insertions(+), 64 deletions(-) diff --git a/plogical/IncScheduler.py b/plogical/IncScheduler.py index ea3eba0bd..80026addc 100644 --- a/plogical/IncScheduler.py +++ b/plogical/IncScheduler.py @@ -210,6 +210,9 @@ class IncScheduler(): credentials = google.oauth2.credentials.Credentials(gDriveData['token'], gDriveData['refresh_token'], gDriveData['token_uri'], gDriveData['client_id'], gDriveData['client_secret'], gDriveData['scopes']) + items.auth = json.dumps(credentials) + items.save() + drive = build('drive', 'v3', credentials=credentials) except BaseException as msg: GDriveJobLogs(owner=items, status=backupSchedule.ERROR, message='Connection to this account failed. Delete and re-setup this account. Error: %s' % (str(msg))).save() diff --git a/requirments.txt b/requirments.txt index a3006d1a9..d3352d596 100755 --- a/requirments.txt +++ b/requirments.txt @@ -1,72 +1,64 @@ +acme==0.21.1 +asgiref==3.2.3 asn1crypto==0.24.0 -atomicwrites==1.3.0 -attrs==19.3.0 -backports.functools-lru-cache==1.6.1 +Babel==0.9.6 +backports.ssl-match-hostname==3.5.0.1 bcrypt==3.1.7 -beautifulsoup4==4.9.1 -cachetools==3.1.1 -caniusepython3==7.2.0 -certifi==2020.4.5.2 -cffi==1.13.1 +boto3==1.9.64 +botocore==1.12.64 +certifi==2018.4.16 chardet==3.0.4 -configparser==4.0.2 -contextlib2==0.6.0.post1 +cloudflare==2.6.1 +ConfigArgParse==0.15.2 +configobj==5.0.6 cryptography==2.8 -decorator==4.4.2 -distlib==0.3.0 -Django==1.11 +decorator==3.4.0 +Django==3.0.1 +docker==3.6.0 +docker-pycreds==0.4.0 +docutils==0.14 enum34==1.1.6 funcsigs==1.0.2 -futures==3.3.0 -google==2.0.3 -google-api-core==1.20.0 -google-api-python-client==1.9.3 -google-auth==1.17.2 -google-auth-httplib2==0.0.3 -google-auth-oauthlib==0.4.1 -googleapis-common-protos==1.52.0 -gpg==1.10.0 -httplib2==0.18.1 -idna==2.9 -importlib-metadata==0.23 -ipaddress==1.0.23 -keyring==10.6.0 -keyrings.alt==3.0 -more-itertools==5.0.0 -mysqlclient==1.3.10 -oauthlib==3.1.0 -packaging==19.2 -paramiko==2.6.0 -pathlib2==2.3.5 -pexpect==4.7.0 -pluggy==0.13.0 -protobuf==3.12.2 -psutil==5.6.3 +future==0.18.2 +idna==2.6 +ipaddress==1.0.16 +IPy==0.75 +Jinja2==2.7.2 +jmespath==0.9.3 +josepy==1.1.0 +jsonpatch==1.2 +jsonpointer==1.9 +MarkupSafe==0.19 +mock==2.0.0 +mysqlclient==1.4.6 +paramiko==2.7.1 +parsedatetime==2.4 +pbr==4.0.4 +pexpect==4.4.0 +prettytable==0.7.2 +psutil==5.4.3 ptyprocess==0.6.0 -py==1.8.0 -pyasn1==0.4.8 -pyasn1-modules==0.2.8 -pycairo==1.16.2 -pycparser==2.19 -pycrypto==2.6.1 -pygobject==3.26.1 +py3dns==3.2.1 +pycparser==2.18 +pygpgme==0.3 PyNaCl==1.3.0 -pyOpenSSL==19.1.0 -pyparsing==2.4.5 -pytest==4.6.6 -pytz==2020.1 -pyxdg==0.25 -requests==2.23.0 -requests-oauthlib==1.3.0 -rsa==4.0 -scandir==1.10.0 -SecretStorage==2.3.1 -selenium==3.141.0 -SimpleWebSocketServer==0.1.1 -six==1.15.0 -soupsieve==1.9.6 -uritemplate==3.0.1 -urllib3==1.25.9 -validators==0.14.2 -wcwidth==0.1.7 -zipp==0.6.0 +pyOpenSSL==17.5.0 +pyRFC3339==1.1 +python-dateutil==2.7.5 +pytz==2018.4 +pyudev==0.15 +pyxattr==0.7.1 +PyYAML==3.10 +requests==2.18.4 +requests-file==1.4.3 +s3transfer==0.1.13 +tornado==6.0.4 +six==1.13.0 +sqlparse==0.3.0 +tldextract==2.2.0 +urllib3==1.22 +websocket-client==0.56.0 +zope.component==4.4.1 +zope.event==4.3.0 +zope.interface==4.5.0 +validators==0.14.2 \ No newline at end of file