mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2024-11-26 08:49:50 +00:00
Removed some debug prints
This commit is contained in:
parent
efb0d6ef28
commit
8ec391edc9
@ -280,7 +280,7 @@ class Dos33Dirent(object):
|
|||||||
sector_map = []
|
sector_map = []
|
||||||
while sector_num > 0:
|
while sector_num > 0:
|
||||||
image.assert_valid_sector(sector_num)
|
image.assert_valid_sector(sector_num)
|
||||||
print "reading track/sector list", sector_num
|
log.debug("reading track/sector list at %d for %s" % (sector_num, self))
|
||||||
data, _ = image.get_sectors(sector_num)
|
data, _ = image.get_sectors(sector_num)
|
||||||
sector = Dos33TSSector(image.header, data=data)
|
sector = Dos33TSSector(image.header, data=data)
|
||||||
sector_map.extend(sector.get_tslist())
|
sector_map.extend(sector.get_tslist())
|
||||||
@ -430,7 +430,7 @@ class Dos33DiskImage(DiskImageBase):
|
|||||||
files = []
|
files = []
|
||||||
while sector > 0:
|
while sector > 0:
|
||||||
self.assert_valid_sector(sector)
|
self.assert_valid_sector(sector)
|
||||||
print "reading catalog sector", sector
|
log.debug("reading catalog sector: %d" % sector)
|
||||||
values, style = self.get_sectors(sector)
|
values, style = self.get_sectors(sector)
|
||||||
sector = self.header.sector_from_track(values[1], values[2])
|
sector = self.header.sector_from_track(values[1], values[2])
|
||||||
i = 0xb
|
i = 0xb
|
||||||
@ -439,13 +439,13 @@ class Dos33DiskImage(DiskImageBase):
|
|||||||
if dirent.flag == 0:
|
if dirent.flag == 0:
|
||||||
break
|
break
|
||||||
if not dirent.is_sane:
|
if not dirent.is_sane:
|
||||||
print "not sane: %s" % dirent
|
log.warning("Illegally formatted directory entry %s" % dirent)
|
||||||
self.all_sane = False
|
self.all_sane = False
|
||||||
elif not dirent.deleted:
|
elif not dirent.deleted:
|
||||||
files.append(dirent)
|
files.append(dirent)
|
||||||
if directory is not None:
|
if directory is not None:
|
||||||
directory.set(num, dirent)
|
directory.set(num, dirent)
|
||||||
print dirent
|
log.debug("valid directory entry %s" % dirent)
|
||||||
i += 0x23
|
i += 0x23
|
||||||
num += 1
|
num += 1
|
||||||
self.files = files
|
self.files = files
|
||||||
@ -482,7 +482,7 @@ class Dos33DiskImage(DiskImageBase):
|
|||||||
sector = self.header.first_directory
|
sector = self.header.first_directory
|
||||||
while sector > 0:
|
while sector > 0:
|
||||||
self.assert_valid_sector(sector)
|
self.assert_valid_sector(sector)
|
||||||
print "reading catalog sector", sector
|
log.debug("loading directory segment from catalog sector %d" % sector)
|
||||||
raw, pos, size = self.get_raw_bytes(sector)
|
raw, pos, size = self.get_raw_bytes(sector)
|
||||||
byte_order.extend(range(pos, pos + size))
|
byte_order.extend(range(pos, pos + size))
|
||||||
sector = self.header.sector_from_track(raw[1], raw[2])
|
sector = self.header.sector_from_track(raw[1], raw[2])
|
||||||
@ -494,10 +494,10 @@ class Dos33DiskImage(DiskImageBase):
|
|||||||
def get_directory_sector_links(self, sector_num):
|
def get_directory_sector_links(self, sector_num):
|
||||||
if sector_num == -1:
|
if sector_num == -1:
|
||||||
sector_num = self.header.first_directory
|
sector_num = self.header.first_directory
|
||||||
print "checking directory sector", sector_num
|
|
||||||
self.assert_valid_sector(sector_num)
|
self.assert_valid_sector(sector_num)
|
||||||
raw, _, _ = self.get_raw_bytes(sector_num)
|
raw, _, _ = self.get_raw_bytes(sector_num)
|
||||||
next_sector = self.header.sector_from_track(raw[1], raw[2])
|
next_sector = self.header.sector_from_track(raw[1], raw[2])
|
||||||
|
log.debug("checking catalog sector %d, next catalog sector: %d" % (sector_num, next_sector))
|
||||||
if next_sector == 0:
|
if next_sector == 0:
|
||||||
raise NoSpaceInDirectory("No space left in catalog")
|
raise NoSpaceInDirectory("No space left in catalog")
|
||||||
return sector_num, next_sector
|
return sector_num, next_sector
|
||||||
|
@ -34,7 +34,6 @@ class SegmentParser(object):
|
|||||||
self.segments.extend(self.image.segments)
|
self.segments.extend(self.image.segments)
|
||||||
|
|
||||||
def get_image(self, r):
|
def get_image(self, r):
|
||||||
print self.image_type
|
|
||||||
return self.image_type(r)
|
return self.image_type(r)
|
||||||
|
|
||||||
def check_image(self):
|
def check_image(self):
|
||||||
|
@ -642,7 +642,6 @@ class DefaultSegment(object):
|
|||||||
"""Get a list of comments at specified indexes"""
|
"""Get a list of comments at specified indexes"""
|
||||||
s = self.style[indexes]
|
s = self.style[indexes]
|
||||||
has_comments = np.where(s & comment_bit_mask > 0)[0]
|
has_comments = np.where(s & comment_bit_mask > 0)[0]
|
||||||
print "has_comments", has_comments
|
|
||||||
comments = []
|
comments = []
|
||||||
for where_index in has_comments:
|
for where_index in has_comments:
|
||||||
raw = self.get_raw_index(indexes[where_index])
|
raw = self.get_raw_index(indexes[where_index])
|
||||||
@ -657,7 +656,6 @@ class DefaultSegment(object):
|
|||||||
"""
|
"""
|
||||||
s = self.style[indexes]
|
s = self.style[indexes]
|
||||||
has_comments = np.where(s & comment_bit_mask > 0)[0]
|
has_comments = np.where(s & comment_bit_mask > 0)[0]
|
||||||
print "has_comments", has_comments
|
|
||||||
comments = []
|
comments = []
|
||||||
for where_index in has_comments:
|
for where_index in has_comments:
|
||||||
raw = self.get_raw_index(indexes[where_index])
|
raw = self.get_raw_index(indexes[where_index])
|
||||||
|
Loading…
Reference in New Issue
Block a user