File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -134,14 +134,15 @@ def upload(self, content):
134134 logger .info (snakesay (msg ))
135135 return True
136136
137- def get_sharing_url (self ):
137+ def get_sharing_url (self , quiet = False ):
138138 """Returns PythonAnywhere sharing url for `self.path` if file
139139 is shared, empty string otherwise."""
140140
141141 url = self .api .sharing_get (self .path )
142142 if url :
143143 sharing_url = self ._make_sharing_url (url )
144- logger .info (snakesay (f"{ self .path } is shared at { sharing_url } " ))
144+ if not quiet :
145+ logger .info (snakesay (f"{ self .path } is shared at { sharing_url } " ))
145146 return sharing_url
146147
147148 logger .info (snakesay (f"{ self .path } has not been shared" ))
@@ -167,7 +168,7 @@ def unshare(self):
167168 """Returns `True` when file unshared or has not been shared,
168169 `False` otherwise."""
169170
170- already_shared = self .get_sharing_url ()
171+ already_shared = self .get_sharing_url (quiet = True )
171172 if already_shared :
172173 result = self .api .sharing_delete (self .path )
173174 if result == 204 :
You can’t perform that action at this time.
0 commit comments