Skip to content

Commit

Permalink
fix(sim:ta): Use secrets instead random to generate the random nu…
Browse files Browse the repository at this point in the history
…mber.
  • Loading branch information
vinci1it2000 authored and ankostis committed Jan 29, 2019
1 parent f6c699e commit a973000
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pCO2SIM/src/co2mpas/io/ta.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import zlib
import json
import lmfit
import random
import secrets
import tarfile
import logging
import functools
Expand Down Expand Up @@ -427,7 +427,7 @@ def define_ta_id(vehicle_family_id, data, report, dice, meta, dice_report,
'output_file': make_hash(output_file.read()),
'input_file': make_hash(input_file.read()),
},
'user_random': random.randint(0, 99),
'user_random': secrets.randbelow(100),
'extension': int(dice.get('extension', False)),
'bifuel': int(dice.get('bifuel', False)),
'wltp_retest': dice.get('wltp_retest', '-'),
Expand Down

0 comments on commit a973000

Please sign in to comment.