ls: fixed an issue where big DMS couldn't be read by ls
This commit is contained in:
@ -34,9 +34,10 @@ def run(config):
|
|||||||
if input[2] == DMS and not config['ls']['longformat']:
|
if input[2] == DMS and not config['ls']['longformat']:
|
||||||
dms = input[0]
|
dms = input[0]
|
||||||
l = []
|
l = []
|
||||||
for view in input[0]:
|
for viewname in input[0]:
|
||||||
l.append(tostr(view) + "\t(Date created: " + str(bytes2str_object(dms[view].comments["Date created"]))+")")
|
view = dms[viewname]
|
||||||
dms[view].close()
|
l.append(tostr(viewname) + "\t(Date created: " + str(bytes2str_object(view.comments["Date created"]))+")")
|
||||||
|
view.close()
|
||||||
l.sort()
|
l.sort()
|
||||||
for v in l:
|
for v in l:
|
||||||
print(v)
|
print(v)
|
||||||
|
@ -227,7 +227,9 @@ cdef class DMS(OBIWrapper):
|
|||||||
cdef str s
|
cdef str s
|
||||||
s=""
|
s=""
|
||||||
for view_name in self.keys():
|
for view_name in self.keys():
|
||||||
s = s + repr(self.get_view(view_name)) + "\n"
|
view = self.get_view(view_name)
|
||||||
|
s = s + repr(view) + "\n"
|
||||||
|
view.close()
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user