Re: [rhel6-branch 1/2] iscsi: partial offload drivers.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 29, 2010 at 03:37:56PM +0100, Ales Kozumplik wrote:
> +
> +def find_program_in_path(prog, raise_on_error=False):
> +    for d in os.environ["PATH"].split(":"):

os.pathsep is the portable way to get ':'


> +        full = "%s/%s" % (d, prog)

I'd use os.path.join() to make sure there aren't any ugly // in the path

> +        if os.access(full, os.X_OK):
> +            return full
> +        


Kill the extra spaces please :)

> +    if raise_on_error:
> +        raise RuntimeError("Unable to locate a needed executable: '%s'" % prog)
> +    return None
> @@ -43,6 +43,8 @@ except ImportError:
>  ISCSID=""
>  INITIATOR_FILE="/etc/iscsi/initiatorname.iscsi"
>  

Spaces..

> +ISCSI_MODULES=['cxgb3i', 'bnx2i', 'be2iscsi']
> +
>  def find_iscsi_files():
>      global ISCSID
>      if ISCSID == "":
> @@ -193,6 +195,15 @@ class iscsi(object):
>                  os.makedirs(fulldir, 0755)
>  

And a couple more spaces.


-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)

Attachment: pgpzPtch_Ko5k.pgp
Description: PGP signature

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux