[Python-modules-team] Bug#849333: faker: Non-determistically FTBFS due to tests sometimes exposing UnboundLocalError

Chris Lamb lamby at debian.org
Sun Dec 25 18:05:27 UTC 2016


tags 849333 + patch
thanks

Patch attached.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
diff --git a/faker/providers/ssn/fi_FI/__init__.py b/faker/providers/ssn/fi_FI/__init__.py
index 44d9ff3..bba2c0b 100644
--- a/faker/providers/ssn/fi_FI/__init__.py
+++ b/faker/providers/ssn/fi_FI/__init__.py
@@ -39,7 +39,7 @@ class Provider(SsnProvider):
         if birthday.year < 2000:
             separator = '-'
         else:
-            separator += 'A'
+            separator = 'A'
         suffix = str(random.randrange(2, 899)).zfill(3)
         checksum = _checksum(hetu_date + suffix)
         hetu = "".join([hetu_date, separator, suffix, checksum])


More information about the Python-modules-team mailing list