Opened 10 years ago

Closed 10 years ago

#13195 closed defect (fixed)

import shutil in sage-ptest

Reported by: Jeroen Demeyer Owned by: Leif Leonhardy
Priority: blocker Milestone: sage-5.1
Component: scripts Keywords:
Cc: Merged in: sage-5.1.rc1
Authors: Jeroen Demeyer Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Jeroen Demeyer)

The following can happen when running sage -tp [...]:

Traceback (most recent call last):
  File "/SSD1/sage-5.1.rc0/local/bin/sage-ptest", line 396, in <module>
NameError: name 'shutil' is not defined

apply 13195_ptest_shutil.patch to the scripts (local/bin) repository.

Attachments (1)

13195_ptest_shutil.patch (542 bytes) - added by Jeroen Demeyer 10 years ago.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by Jeroen Demeyer

Attachment: 13195_ptest_shutil.patch added

comment:1 Changed 10 years ago by Jeroen Demeyer

Description: modified (diff)
Status: newneeds_review

comment:2 Changed 10 years ago by Volker Braun

Reviewers: Volker Braun
Status: needs_reviewpositive_review

I've never seen that error but its better to import it if we use it, of course ;-)

comment:3 Changed 10 years ago by John Palmieri

For what it's worth, I tested it by adding a line:

  • sage-ptest

    diff --git a/sage-ptest b/sage-ptest
    a b for gr in range(0,numglobaliteration): 
    388388    # Should TMP be a subdirectory of tempfile.gettempdir() rather than SAGE_TE
    389389    TMP = os.path.join(SAGE_TESTDIR, '%s-%s' % (HOSTNAME, os.getpid()))
    390390    TMP = os.path.abspath(TMP)
     391    os.makedirs(TMP)
    391392    try:
    392393        os.makedirs(TMP)
    393394    except OSError:

Naturally, this resulted in an error before the patch, success after the patch.

comment:4 Changed 10 years ago by Jeroen Demeyer

Milestone: sage-5.2sage-5.1

comment:5 Changed 10 years ago by Jeroen Demeyer

Merged in: sage-5.1.rc1
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.