Skip to content

Commit

Permalink
Fix lint errors in globaleaks/services/tor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed Nov 18, 2024
1 parent 1d45505 commit b8dfa57
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/globaleaks/services/tor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from txtorcon import build_local_tor_connection
from twisted.internet import reactor
from twisted.internet.defer import Deferred, returnValue
from twisted.internet.defer import Deferred
from txtorcon import TorConfig

from globaleaks.services.service import Service
Expand Down Expand Up @@ -34,7 +34,7 @@ def reset(self):
self.tor_conn = None

def stop(self):
super(Tor, self).stop()
super().stop()

if self.tor_conn is None:
return
Expand Down Expand Up @@ -90,10 +90,10 @@ def unload_onion_service(self, tid):
return

if hasattr(self.state.tenants[tid], 'ephs') and self.state.tenants[tid].ephs:
try:
self.state.tenants[tid].ephs.remove()
except AttributeError:
yield self.state.tenants[tid].ephs.remove_from_tor(self.tor_conn.protocol)
try:
self.state.tenants[tid].ephs.remove()
except AttributeError:
yield self.state.tenants[tid].ephs.remove_from_tor(self.tor_conn.protocol)

def operation(self):
restart_deferred = Deferred()
Expand Down

0 comments on commit b8dfa57

Please sign in to comment.