Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Kajongg
Commits
db344fd7
Commit
db344fd7
authored
Apr 07, 2021
by
Wolfgang Rohdewald
Browse files
pylint: raise from
parent
b0127ebd
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/hand.py
View file @
db344fd7
...
...
@@ -140,8 +140,8 @@ class Hand(StrMixin):
if
len
(
part
)
>
1
:
try
:
self
.
__lastSource
=
TileSource
.
byChar
[
part
[
1
]]
except
KeyError
:
raise
Exception
(
'{} has unknown lastTile {}'
.
format
(
inString
,
part
[
1
]))
except
KeyError
as
_
:
raise
Exception
(
'{} has unknown lastTile {}'
.
format
(
inString
,
part
[
1
]))
from
_
if
len
(
part
)
>
2
:
self
.
__announcements
=
set
(
part
[
2
])
elif
partId
==
'L'
:
...
...
src/login.py
View file @
db344fd7
...
...
@@ -134,12 +134,11 @@ class Url(str, StrMixin):
'/modules/networkstatus'
,
'org.kde.Solid.Networking.status'
],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
).
communicate
(
timeout
=
1
)
except
subprocess
.
TimeoutExpired
:
raise
twisted
.
internet
.
error
.
ConnectError
()
except
subprocess
.
TimeoutExpired
as
_
:
raise
twisted
.
internet
.
error
.
ConnectError
()
from
_
stdoutdata
=
stdoutdata
.
strip
()
stderrdata
=
stderrdata
.
strip
()
if
stderrdata
==
''
and
stdoutdata
!=
'4'
:
# pylint: disable=nonstandard-exception
raise
twisted
.
internet
.
error
.
ConnectError
()
# if we have stderrdata, qdbus probably does not provide the
# service we want, so ignore it
...
...
src/player.py
View file @
db344fd7
...
...
@@ -351,9 +351,9 @@ class Player(StrMixin):
else
:
try
:
self
.
_concealedTiles
.
remove
(
tile
)
except
ValueError
:
except
ValueError
as
_
:
raise
Exception
(
'removeTile(%s): tile not in concealed %s'
%
(
tile
,
''
.
join
(
self
.
_concealedTiles
)))
(
tile
,
''
.
join
(
self
.
_concealedTiles
)))
from
_
if
tile
is
self
.
lastTile
:
self
.
lastTile
=
None
self
.
_hand
=
None
...
...
src/query.py
View file @
db344fd7
...
...
@@ -85,7 +85,7 @@ class DBCursor(sqlite3.Cursor):
else
:
if
not
failSilent
:
logError
(
msg
)
raise
QueryException
(
msg
)
raise
QueryException
(
msg
)
from
exc
return
def
__str__
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment