Skip to content

Commit 7d9ba4e

Browse files
committed
Random fixes
Everything else that was wrong or was making the linter unhappy
1 parent 0585bea commit 7d9ba4e

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

mymc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def do_rename(cmd, mc, opts, args, opterr):
337337
mc.rename(args[0], args[1])
338338

339339
def _get_ps2_title(mc, enc):
340-
s = mc.get_icon_sys(".");
340+
s = mc.get_icon_sys(".")
341341
if s == None:
342342
return None
343343
a = ps2save.unpack_icon_sys(s)

ps2mc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ def delete_dirloc(self, dirloc, truncate, name):
12361236

12371237
if dirloc in self.open_files:
12381238
raise io_error(EBUSY,
1239-
"cannot remove open file", filename)
1239+
"cannot remove open file", name)
12401240

12411241
epc = self.entries_per_cluster
12421242

ps2mc_dir.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import struct
1313
import time
1414
import calendar
15+
import os
1516

1617
PS2MC_DIRENT_LENGTH = 512
1718

ps2save.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,14 +369,14 @@ def _load_max_drive_2(self):
369369
off = 0
370370
for i in range(dirlen):
371371
if len(s) - off < 36:
372-
raise eof(f)
372+
raise eof(self.f)
373373
(l, name) = struct.unpack("<L32s", s[off : off + 36])
374374
name = zero_terminate(name)
375375
# print("%08x %08x %s" % (off, l, name))
376376
off += 36
377377
data = s[off : off + l]
378378
if len(data) != l:
379-
raise eof(f)
379+
raise eof(self.f)
380380
self.set_file(i,
381381
(DF_RWX | DF_FILE | DF_0400 | DF_EXISTS,
382382
0, l, timestamp, 0, 0, timestamp, 0,

0 commit comments

Comments
 (0)