Comment 6 for bug 1419466

Revision history for this message
tarch (tarcisio-fedrizzi) wrote :

Hi Germar,
the problem arises because the default division operator has been changed in python3.

Here there is an example:

python2
---
+>>> 2 / 3
0
+>>> 2 // 3
0
-----
python3
---
+>>> 2 / 3
0.6666666666666666
+>>> 2 // 3
0

so when on this line:

hour = self.get_automatic_backup_time(profile_id) / 100;

you do the division this means two different things depending on which python you use.

This means that probably the best fix would be to change the row to:

hour = self.get_automatic_backup_time(profile_id) // 100;

Best regards,
Tarcisio.