Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 57550 Details for
Bug 90823
Various one line changes as recommended by pychecker.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
GLIStorageDevice.py
GLIStorageDevice.py.patch (text/plain), 3.08 KB, created by
Christopher Hotchkiss
on 2005-04-28 23:12:37 UTC
(
hide
)
Description:
GLIStorageDevice.py
Filename:
MIME Type:
Creator:
Christopher Hotchkiss
Created:
2005-04-28 23:12:37 UTC
Size:
3.08 KB
patch
obsolete
>Index: GLIStorageDevice.py >=================================================================== >RCS file: /var/cvsroot/gentoo/src/installer/src/GLIStorageDevice.py,v >retrieving revision 1.34 >diff -a -u -r1.34 GLIStorageDevice.py >--- GLIStorageDevice.py 22 Apr 2005 06:11:59 -0000 1.34 >+++ GLIStorageDevice.py 29 Apr 2005 05:57:20 -0000 >@@ -1,5 +1,6 @@ >-import commands, string, re, os, parted >+import commands, string, os, parted > from decimal import Decimal >+from GLIUtility import * > > MEGABYTE = 1024 * 1024 > >@@ -315,7 +316,6 @@ > parts.sort() > partlist = [] > tmppart = None >- tmppart_log = None > for part in parts: > if archinfo[self._arch]['extended'] and part > Decimal("4.1"): break > tmppart = self._partitions[part] >@@ -323,7 +323,6 @@ > if tmppart.is_extended(): > for part_log in parts: > if part_log < Decimal("4.9"): continue >- tmppart_log = self._partitions[part_log] > partlist.append(part_log) > return partlist > >@@ -390,7 +389,7 @@ > # @param message Error message > def _error(self, message): > "Raises an exception" >- raise "DeviceObjectError", message >+ raise GLIException("DeviceObjectError", 'fatal', 'Device', message) > > ## > # Utility function for running a command and returning it's output as a list >@@ -470,14 +469,14 @@ > if type == "ntfs": > min_bytes = int(commands.getoutput("ntfsresize -f --info " + dev_node + " | grep -e '^You might resize' | sed -e 's/You might resize at //' -e 's/ bytes or .\+//'")) > self._min_mb_for_resize = int(min_bytes / MEGABYTE) + 1 >- self._resizeable == True >+ self._resizeable = True > elif type == "ext2" or type == "ext3": > block_size = string.strip(commands.getoutput("dumpe2fs -h " + dev_node + r" 2>&1 | grep -e '^Block size:' | sed -e 's/^Block size:\s\+//'")) > free_blocks = string.strip(commands.getoutput("dumpe2fs -h " + dev_node + r" 2>&1 | grep -e '^Free blocks:' | sed -e 's/^Free blocks:\s\+//'")) > free_bytes = int(block_size * free_blocks) > # can't hurt to pad (the +50) it a bit since this is really just a guess > self._min_mb_for_resize = self._mb - int(free_bytes / MEGABYTE) + 50 >- self._resizeable == True >+ self._resizeable = True > else: > parted_part = self._device._parted_disk.get_partition(int(self._minor)) > try: >@@ -517,7 +516,6 @@ > if not self.is_extended(): > return None > logicals = [] >- start = self._start > parts = self._device._partitions.keys() > parts.sort() > for part in parts: >@@ -702,7 +700,7 @@ > # Utility function to raise an exception > # @param message Error message > def _error(self, message): >- raise "PartitionObjectError", message >+ raise GLIException("PartitionObjectError", 'fatal', 'Partition', message) > > ## > # Returns a list of detected partitionable devices >@@ -740,8 +738,8 @@ > if not os.path.exists(device): > device = None > for path, dirs, files in os.walk("/dev"): >- for file in files: >- full_file = os.path.join(path, file) >+ for d_file in files: >+ full_file = os.path.join(path, d_file) > if not os.path.exists(full_file): > continue > statres = os.stat(full_file)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 90823
:
57550
|
57551
|
57552