keeleysam / instadmg

Automatically exported from code.google.com/p/instadmg
0 stars 0 forks source link

NameError: global name 'possibleDiscsInfo' is not defined #91

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. svn checkout http://instadmg.googlecode.com/svn/trunk instadmg
2. sudo ./instadmg/AddOns/InstaUp2Date/importDisk.py --legacy

What is the expected output? What do you see instead?

hf-162-57:~ junior$ sudo ./instadmg/AddOns/InstaUp2Date/importDisk.py --legacy
The following mounts are avalible: 
        1)  "/Volumes/SL-1063-Inst-DVD" (Hard Drive) - MacOS X Client 10.6.3 (10D575)
        2)  "/Volumes/SnowLeopard Install DVD" (Hard Drive) - MacOS X Client 10.6.3 (10D575)
Please select a volume by typeing in the number that precedes it: 1
Traceback (most recent call last):
  File "./instadmg/AddOns/InstaUp2Date/importDisk.py", line 200, in <module>
    main()
  File "./instadmg/AddOns/InstaUp2Date/importDisk.py", line 117, in main
    if choice > len(possibleDiscsInfo) or choice <= 0:
NameError: global name 'possibleDiscsInfo' is not defined

What version of InstaDMG are you running? What revision number (this should be 
the second line of your package log)?

instaUp2Date.py 0.5b (svn revision: 414)

What OS are you running on (booted from)?

ProductVersion: 10.6.7
BuildVersion:   10J869

What OS are you installing?

Importing 10D575 from disk (retail 10.6.3 cloned to HD with ASR)

Please provide any additional information below.

Original issue reported on code.google.com by will...@gmail.com on 17 Jun 2011 at 7:13

GoogleCodeExporter commented 9 years ago
The faulty line says
                        if choice > len(possibleDiscsInfo) or choice <= 0:
but this should probably be
                        if choice > len(possibleVolumes) or choice <= 0:
as you are iterating on 'for thisVolume in possibleVolumes:' above, and use 
'chosenMount = possibleVolumes[choice -1]' below.

(Hooray, finally my B in the python programming course pays of)

Original comment by will...@gmail.com on 17 Jun 2011 at 7:17