summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2024-01-21 23:59:11 +0100
committeremkael <emkael@tlen.pl>2024-01-22 00:06:10 +0100
commit2caf6f63259988c1ef08aa12a852e875fb9c7af2 (patch)
treeba6b85db8a9689c6f087a51ecae9cb99060b3a30
parentd7d0f6da7ebf28eca2a68b67da7863607e72b158 (diff)
Code formatting
-rw-r--r--squaredeal/__init__.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/squaredeal/__init__.py b/squaredeal/__init__.py
index 9c6e961..b6aa7bf 100644
--- a/squaredeal/__init__.py
+++ b/squaredeal/__init__.py
@@ -157,11 +157,13 @@ class SquareDeal(object):
try:
self.phases[phase_no-1].s_keys[session_no-1] = lineparts[1]
except IndexError:
- raise SquareDealError('Session %s from SQK not declared in SQD' % (lineparts[0]))
+ raise SquareDealError(
+ 'Session %s from SQK not declared in SQD' % (lineparts[0]))
for ph_idx, phase in enumerate(self.phases):
for s_idx, s_key in enumerate(phase.s_keys):
if s_key is None:
- raise SquareDealError('Session %d,%d missing a key in SQK' % (ph_idx+1, s_idx+1))
+ raise SquareDealError(
+ 'Session %d,%d missing a key in SQK' % (ph_idx+1, s_idx+1))
sqk_hash = self._get_file_hash(sqkpath)
if sqk_hash != self.hash:
raise SquareDealError(
@@ -193,8 +195,10 @@ class SquareDeal(object):
for ph_idx, phase in enumerate(self.phases):
for s_idx, session_key in enumerate(phase.s_keys):
if session_key is None:
- raise SquareDealError('Missing session key for session %d,%d' % (ph_idx+1, s_idx+1))
- sqkfile.write(('%d,%d:%s\r\n' % (ph_idx+1, s_idx+1, session_key)).encode('utf8'))
+ raise SquareDealError(
+ 'Missing session key for session %d,%d' % (ph_idx+1, s_idx+1))
+ sqkfile.write(
+ ('%d,%d:%s\r\n' % (ph_idx+1, s_idx+1, session_key)).encode('utf8'))
self.hash = self._get_file_hash(sqkpath)
def tofile(self, sqdpath, sqkpath=None, make_backups=True):