Bug 867125 - pylint: E0601:2716,35:FSSet.mountFilesystems: Using variable 'e' before assignment
pylint: E0601:2716,35:FSSet.mountFilesystems: Using variable 'e' before assig...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
:
: 888220 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-16 16:05 EDT by Steve Tyler
Modified: 2012-12-18 10:25 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-18 01:51:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Steve Tyler 2012-10-16 16:05:39 EDT
Description of problem:
E0601:2716,35:FSSet.mountFilesystems: Using variable 'e' before assignment

$ less -N anaconda-18.16-1/pyanaconda/storage/__init__.py
...
   2713             try:
   2714                 device.setup()
   2715             except Exception as msg:
   2716                 if errorHandler.cb(e, device) == ERROR_RAISE:
   2717                     raise
   2718                 else:
   2719                     continue
...

************* Module pyanaconda.storage
E0602: 99,15:storageInitialize: Undefined variable 'anaconda'
E0602:220,12:turnOnFilesystems: Undefined variable 'shutil'
E0602:774,28:Storage.shouldClear: Undefined variable 'CLEARPART_TYPE_LIST'
E1101:795,12:Storage.recursiveRemove: Instance of 'Storage' has no 'destroyFormat' member
E0602:854,28:Storage.initializeDisk: Undefined variable 'storage'
E0601:2716,35:FSSet.mountFilesystems: Using variable 'e' before assignment

Version-Release number of selected component (if applicable):
anaconda-18.16-1

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Steve Tyler 2012-10-16 16:56:08 EDT
E0602:854,28:Storage.initializeDisk: Undefined variable 'storage'

$ less -N anaconda-18.16-1/pyanaconda/storage/__init__.py
...
    853                 # remove the magic partition
    854                 for part in storage.partitions:
    855                     if part.disk == disk and part.partedPartition.number == number:
...
Comment 2 Steve Tyler 2012-10-16 17:02:30 EDT
E0602:774,28:Storage.shouldClear: Undefined variable 'CLEARPART_TYPE_LIST'

$ less -N anaconda-18.16-1/pyanaconda/storage/__init__.py
...
    774         if clearPartType == CLEARPART_TYPE_LIST and \
    775            device.name not in clearPartDevices:
    776             return False
...
Comment 3 Steve Tyler 2012-10-16 17:07:21 EDT
E1101:795,12:Storage.recursiveRemove: Instance of 'Storage' has no 'destroyFormat' member

$ less -N anaconda-18.16-1/pyanaconda/storage/__init__.py
...
    794         if device.isDisk:
    795             self.destroyFormat(device)
    796         else:
    797             self.destroyDevice(device)
Comment 4 Steve Tyler 2012-10-16 17:13:34 EDT
E0602:220,12:turnOnFilesystems: Undefined variable 'shutil'

$ less -N anaconda-18.16-1/pyanaconda/storage/__init__.py
...
    218         if upgrade_migrate:
    219             # we should write out a new fstab with the migrated fstype
    220             shutil.copyfile("%s/etc/fstab" % ROOT_PATH,
    221                             "%s/etc/fstab.anaconda" % ROOT_PATH)
    222             storage.fsset.write()
Comment 5 Steve Tyler 2012-10-16 18:48:29 EDT
(In reply to comment #2)
> E0602:774,28:Storage.shouldClear: Undefined variable 'CLEARPART_TYPE_LIST'
> 
> $ less -N anaconda-18.16-1/pyanaconda/storage/__init__.py
> ...
>     774         if clearPartType == CLEARPART_TYPE_LIST and \
>     775            device.name not in clearPartDevices:
>     776             return False
> ...

False positive:
$ grep CLEARPART_TYPE_LIST pykickstart/constants.py
CLEARPART_TYPE_LIST = 3

$ diff -u tests/pylint/runpylint.sh tests/pylint/runpylint-1.sh
--- tests/pylint/runpylint.sh	2012-10-11 17:37:40.000000000 -0700
+++ tests/pylint/runpylint-1.sh	2012-10-16 15:35:37.261083229 -0700
@@ -88,8 +88,8 @@
       sys.path.insert(4, "pyanaconda/.libs"); \
       sys.path.insert(5, "pyanaconda/iw"); \
       sys.path.insert(6, "pyanaconda/textw"); \
-      sys.path.insert(7, "/usr/share/system-config-date"); \
-      sys.path.insert(8, "/usr/share/system-config-keyboard")' \
+      sys.path.insert(7, "pykickstart"); \
+      ' \
     -i y -r n --disable=C,R --rcfile=/dev/null \
     $DISABLED_WARN_OPTIONS \
     $DISABLED_ERR_OPTIONS \
Comment 6 Fedora Update System 2012-12-14 22:35:08 EST
anaconda-18.37.3-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.37.3-1.fc18
Comment 7 Fedora Update System 2012-12-15 16:13:45 EST
Package anaconda-18.37.3-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-18.37.3-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20461/anaconda-18.37.3-1.fc18
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2012-12-18 01:51:50 EST
anaconda-18.37.3-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Chris Lumens 2012-12-18 10:25:18 EST
*** Bug 888220 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.