Skip to content

Commit

Permalink
Remove uneccessary methods
Browse files Browse the repository at this point in the history
  • Loading branch information
marciovicente committed May 23, 2014
1 parent 5432f52 commit 17057f0
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,6 @@ def mod(self, n):
def is_position_mod(self, value, pos):
return True if value % self.SIZE_OF_FILE is pos else False

def tail(self, obj):
self.file.seek(obj.index * self.STRUCT_SIZE + len(pickle.dumps(self.SIZE_OF_FILE)))
obj_tmp = pickle.loads(self.file.read())
if obj_tmp.index:
self.tail(obj.index)
return obj.index

def insert_in_lisch(self, old_obj, new_obj, index=None):
obj_next = None
if old_obj.index: # if they has a next
Expand Down Expand Up @@ -311,6 +304,7 @@ def remove(self, value, pos=None, next_id=None):

if hasattr(obj, 'value'):
current_pos = pos or self.get_current_position(value)
import pdb; pdb.set_trace()
if value is obj.value:
if obj.index:
replace_obj = self.search_next(obj=obj, pos=current_pos)
Expand All @@ -337,14 +331,6 @@ def search_next(self, obj, pos):
return self.search_next(obj=obj.index, pos=pos)
return False

# ###############################
# ########## TEMPORARY ##########
# ###############################
def print_flag(self):
self.open_file()
self.file.seek(0)
print pickle.loads(self.file.read())
self.close_file()

app = Application()
app.main()
Expand Down

0 comments on commit 17057f0

Please sign in to comment.