mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-07 17:05:16 -04:00
Fix flake8 issues found in cli
This commit is contained in:
parent
343e1be3d0
commit
0a6056e5e6
14 changed files with 146 additions and 128 deletions
|
@ -18,7 +18,8 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import os, shutil
|
||||
import os
|
||||
import shutil
|
||||
from .common import AutoStopTimer
|
||||
|
||||
|
||||
|
@ -57,7 +58,7 @@ class OnionShare(object):
|
|||
"""
|
||||
try:
|
||||
self.port = self.common.get_available_port(17600, 17650)
|
||||
except:
|
||||
except Exception:
|
||||
raise OSError("Cannot find an available OnionShare port")
|
||||
|
||||
def start_onion_service(self, mode, mode_settings, await_publication=True):
|
||||
|
@ -102,7 +103,7 @@ class OnionShare(object):
|
|||
os.remove(filename)
|
||||
elif os.path.isdir(filename):
|
||||
shutil.rmtree(filename)
|
||||
except:
|
||||
except Exception:
|
||||
# Don't crash if file is still in use
|
||||
pass
|
||||
self.cleanup_filenames = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue