@@ -310,10 +310,16 @@ def __init__(self,
310
310
downloader_args = "" ,
311
311
processes = const .DefaultProcessCount ,
312
312
secretkey = const .SecretKey ):
313
-
314
313
super (ByPy , self ).__init__ ()
315
314
self .jsonq = deque (maxlen = 64 )
316
315
316
+ # these two variables are without leading double underscore "__" as to export the as public,
317
+ # so if any code using this class can check the current verbose / debug level
318
+ cached .verbose = self .verbose = verbose
319
+ cached .debug = self .debug = debug
320
+ if not cached .usecache :
321
+ pinfo ("Forced hash recalculation, hash cache won't be used" )
322
+
317
323
# declaration of myself
318
324
global gbypyinst
319
325
gbypyinst = self
@@ -377,13 +383,6 @@ def __init__(self,
377
383
self .__verify = True
378
384
self .processes = processes
379
385
380
- # these two variables are without leadning double underscaore "__" as to export the as public,
381
- # so if any code using this class can check the current verbose / debug level
382
- cached .verbose = self .verbose = verbose
383
- cached .debug = self .debug = debug
384
- if not cached .usecache :
385
- pinfo ("Forced hash recaculation, hash cache won't be used" )
386
-
387
386
#TODO: SSL verification causes some much trouble for different Python version
388
387
# I give up and disable it for good, or for bad
389
388
checkssl = False
@@ -514,7 +513,7 @@ def pv(self, msg, **kwargs):
514
513
pr (msg )
515
514
516
515
def pd (self , msg , level = 1 , ** kwargs ):
517
- if self .debug >= level :
516
+ if self .debug and self . debug >= level :
518
517
pdbg (msg , kwargs )
519
518
520
519
def shalloverwrite (self , prompt ):
@@ -1146,7 +1145,7 @@ def __remove_remote_on_success(self, remotepath):
1146
1145
def __remove_local_on_success (self , localpath ):
1147
1146
if self .__deletesource :
1148
1147
self .pd ("Removing local path '{}' after successful upload." .format (localpath ))
1149
- result = cachedm .remove_path_and_cache (localpath )
1148
+ result = cached .remove_path_and_cache (localpath )
1150
1149
if result == const .ENoError :
1151
1150
self .pd ("Local path '{}' removed." .format (localpath ))
1152
1151
else :
0 commit comments