From 7714c7da13f9d07500bbd56e4ee06e14b12276f7 Mon Sep 17 00:00:00 2001 From: yifanchen Date: Wed, 17 Feb 2016 17:58:04 +0800 Subject: Avoiding UnboundLocalError when using method 'type' on method get_info from SimpleHoster. --- module/plugins/internal/SimpleHoster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index c2a51c879..c68703a73 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -188,8 +188,8 @@ class SimpleHoster(Hoster): info['size'] = parse_size(info['size'], unit) if 'H' in info['pattern']: - type = info['pattern']['H'].strip('-').upper() - info['hash'][type] = info['pattern']['D'] + the_type = info['pattern']['H'].strip('-').upper() + info['hash'][the_type] = info['pattern']['D'] return info -- cgit v1.2.3