Commit 3916205a authored by Jack Darlington's avatar Jack Darlington

Gdrive optional

parent b352bbfd
from pydrive.auth import GoogleAuth try:
from pydrive.drive import GoogleDrive from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
except ImportError:
pass
import os, time import os, time
from ub import config from ub import config
......
...@@ -35,7 +35,10 @@ import shutil ...@@ -35,7 +35,10 @@ import shutil
import requests import requests
import zipfile import zipfile
from tornado.ioloop import IOLoop from tornado.ioloop import IOLoop
import gdriveutils as gd try:
import gdriveutils as gd
except ImportError:
pass
import web import web
try: try:
......
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from pydrive.auth import GoogleAuth try:
from pydrive.auth import GoogleAuth
from googleapiclient.errors import HttpError
gdrive_support= True
except ImportError:
gdrive_support=False
import mimetypes import mimetypes
import logging import logging
...@@ -56,8 +61,6 @@ import io ...@@ -56,8 +61,6 @@ import io
import hashlib import hashlib
import threading import threading
from googleapiclient.errors import HttpError
from tornado import version as tornadoVersion from tornado import version as tornadoVersion
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment