@@ -547,7 +547,7 @@ def push(self, **kwargs):
547
547
p = sub .Popen (rsync , stdin = sub .PIPE )
548
548
p .communicate (input = '\x00 ' .join (files ))
549
549
550
- def _status (self ):
550
+ def _status (self , ** kwargs ):
551
551
catalog = self ._cached_objects ()
552
552
referenced = self ._referenced_objects (** kwargs )
553
553
garbage = catalog - referenced
@@ -558,7 +558,7 @@ def status(self, **kwargs):
558
558
'''
559
559
Show orphan (in tree, but not in cache) and garbage (in cache, but not in tree) objects, if any.
560
560
'''
561
- garbage , orphans = self ._status ()
561
+ garbage , orphans = self ._status (** kwargs )
562
562
if orphans :
563
563
print ('Orphan objects:' )
564
564
for orph in orphans :
@@ -574,7 +574,7 @@ def http_pull(self, **kwargs):
574
574
'''
575
575
ret_code = 0
576
576
577
- _ , orphans = self ._status ()
577
+ _ , orphans = self ._status (** kwargs )
578
578
baseurl = self ._http_opts ()
579
579
for o in orphans :
580
580
stream = http_get (baseurl , o )
@@ -610,7 +610,8 @@ def http_push(self):
610
610
''' NOT IMPLEMENTED '''
611
611
pass
612
612
613
- if __name__ == '__main__' :
613
+
614
+ def main ():
614
615
615
616
import argparse
616
617
@@ -674,3 +675,7 @@ def http_push(self):
674
675
if kwargs .get ('cur_file' ):
675
676
fat .verbose ("ERROR: processing file: " + kwargs .get ('cur_file' ))
676
677
raise
678
+
679
+
680
+ if __name__ == '__main__' :
681
+ main ()
0 commit comments