Ticket #5908 enhancement closed fixed

Opened 9 months ago

Last modified 6 months ago

The tests for twisted.python.filepath shouldn't use eval()

Reported by: itamar Owned by: therve
Priority: normal Milestone:
Component: core Keywords: easy
Cc: Branch:
Author: Launchpad Bug:

Description

Constructing Unix permission octets with eval() is silly; we should fix twisted.test.test_paths not to do so.

Attachments

patch5908.patch Download (1.0 KB) - added by Petit_Dejeuner 7 months ago.
Replaces call to 'eval()' with call to 'int(var, 8)'.

Change History

1

Changed 7 months ago by dinabina

  • status changed from new to assigned
  • owner set to dinabina

Is this a simple matter of changing the use of eval(octet_string) to int(octet_string, 8), where octet_string is built using the existing for-loop.

Changed 7 months ago by Petit_Dejeuner

Replaces call to 'eval()' with call to 'int(var, 8)'.

2

Changed 7 months ago by itamar

  • owner dinabina deleted
  • keywords review added
  • status changed from assigned to new

3

Changed 6 months ago by therve

  • keywords review removed
  • owner set to therve

Looks good, applying.

4

Changed 6 months ago by therve

  • status changed from new to closed
  • resolution set to fixed

(In [36408]) Replace usage of eval by int in twisted.tests.test_path

Author: Petit_Dejeuner Reviewer: therve Fixes: #5908

Note: See TracTickets for help on using tickets.