@@ -210,6 +210,7 @@ class GoogleStorageContentManager(ContentsManager):
210
210
)
211
211
212
212
def __init__ (self , * args , ** kwargs ):
213
+ # Stub for the GSClient instance (set lazily by the client property).
213
214
self ._client = None
214
215
super (GoogleStorageContentManager , self ).__init__ (* args , ** kwargs )
215
216
@@ -465,18 +466,18 @@ def run_post_save_hook(self, model, os_path):
465
466
def _checkpoints_class_default (self ):
466
467
return GoogleStorageCheckpoints
467
468
468
- def _resolve_storagetype (self , path , type ):
469
+ def _resolve_storagetype (self , path , storagetype ):
469
470
"""Based on the arguments and status of GCS, return a valid type."""
470
471
if "/" not in path or path .endswith ("/" ) or path == "" :
471
- if type not in (None , "directory" ):
472
+ if storagetype not in (None , "directory" ):
472
473
raise web .HTTPError (
473
474
400 , u"%s is not a directory" % path , reason = "bad type" )
474
475
return "directory"
475
- if type is None and path .endswith (".ipynb" ):
476
+ if storagetype is None and path .endswith (".ipynb" ):
476
477
return "notebook"
477
- if type is not None :
478
- return type
479
- # If type cannot be inferred from the argument set, hit
478
+ if storagetype is not None :
479
+ return storagetype
480
+ # If type cannot be inferred from the argument set, use
480
481
# the storage API to see if a blob or a prefix exists.
481
482
if self .file_exists (path ):
482
483
return "file"
0 commit comments