Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Paolo D'Onorio De Meo committed Feb 21, 2018
1 parent 4934a36 commit 8678796
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions operations/gxls.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ def __init__(self, filename=None, rethink=None, elastic=None):

@staticmethod
def read_counter():
output = 0
with open(XLS_COUNTER_FILENAME, 'r') as f:
output = f.read()
try:
with open(XLS_COUNTER_FILENAME, 'r') as f:
output = f.read()
except FileNotFoundError:
output = 0
return int(output)

def write_counter(self, count):
Expand Down

0 comments on commit 8678796

Please sign in to comment.