X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=xsetbg.py;h=825b20eb0f9c927614a5285d4c8467524b3c5380;hb=d1e8443a665d4f5f23db32f5ee47d415a5424a04;hp=706e183ef2cad8338877b5a6c59bfa04a419c2c5;hpb=839045f02d15aa1ffb272eb60dff01a5a8f9bd69;p=xsetbg.git diff --git a/xsetbg.py b/xsetbg.py index 706e183..825b20e 100644 --- a/xsetbg.py +++ b/xsetbg.py @@ -50,11 +50,11 @@ if xsetbg_conf.has_option("xsetbg", "min_delay"): min_delay = xsetbg_conf.get("xsetbg", "min_delay") # Borrowed from http://stackoverflow.com/a/2765366 - td_re = re.compile('(?:(?P\d+)y)?' - '(?:(?P\d+)m)?' - '(?:(?P\d+)d)?' - '(?:T(?:(?P\d+)h)?' - '(?:(?P\d+)m)?(?:(?P\d+)s)?)?') + td_re = re.compile('(?:(?P\\d+)y)?' + '(?:(?P\\d+)m)?' + '(?:(?P\\d+)d)?' + '(?:T(?:(?P\\d+)h)?' + '(?:(?P\\d+)m)?(?:(?P\\d+)s)?)?') td_dict = td_re.match(min_delay).groupdict(0) delta = timedelta(days=int(td_dict['days']) + (int(td_dict['months']) * 30) +