Skip to content

Commit

Permalink
added coding header and r for regex string
Browse files Browse the repository at this point in the history
  • Loading branch information
jpohjolainen committed Jun 4, 2015
1 parent 8fa1aec commit 6d9fa35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion calc-date
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = "Janne Pohjolainen"
__copyright__ = "Copyright 2015, 420helsinki"
Expand All @@ -21,7 +22,7 @@ def parse_date(str):
return ret_value, error

def parse_delta(str):
matches = re.findall('(\d+[dhms])', str)
matches = re.findall(r'(\d+[dhms])', str)

if not matches:
return None, "%s does not match format 'NNdNNhNNmNNs'" % (str)
Expand Down

0 comments on commit 6d9fa35

Please sign in to comment.