Skip to content

Commit

Permalink
Encoding regular expression as raw string to avoid syntax warning abo…
Browse files Browse the repository at this point in the history
…ut invalid escape sequence
  • Loading branch information
pfuntner committed Nov 9, 2024
1 parent e47e709 commit 1168676
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/recentdownloads
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ log.setLevel(logging.WARNING - 10*(args.verbose or 0))
if not args.time:
mtime = -1/24
else:
match = re.search('^((\d+)?\.?(\d+)?)([smhd])?$', args.time)
match = re.search(r'^((\d+)?\.?(\d+)?)([smhd])?$', args.time)
if match:
log.debug('match groups: {groups}'.format(groups=match.groups()))
mtime = match.group(2)
Expand Down

0 comments on commit 1168676

Please sign in to comment.