Am 14. Januar 2011 14:16 schrieb Guido Trotter <[email protected]>:
> On Wed, Jan 12, 2011 at 2:17 PM, Apollon Oikonomopoulos
> <[email protected]> wrote:
>> +
>> +  @classmethod
>> +  def _InstanceAllNICFiles(cls, instance_name):
>> +    """Returns all existing NIC filenames
>> +
>> +    """
>> +    return glob.glob(utils.PathJoin(cls._NICS_DIR, "%s-[0-9]" % 
>> instance_name))
>> +
>
> Any specific reason why this is [0-9] rather than *? What if there's
> an instance with 10 nics? (ok, quite improbable, but...)
> Shall i just change it to *?

$ grep ^MAX_NICS lib/constants.py
MAX_NICS = 8

I'd much rather prefer stat()'ing the files with their known name
instead of using globbing.

Michael

Reply via email to