Fix regression in 505 driver

This commit is contained in:
Kovid Goyal 2009-06-26 08:29:25 -07:00
parent e0bd520769
commit bdc3478139

View File

@ -186,12 +186,12 @@ class PRS505(CLI, Device):
info = metadata.next() info = metadata.next()
path = location[0] path = location[0]
blist = 2 if location[3] == 'cardb' else 1 if location[3] == 'carda' else 0 blist = 2 if location[3] == 'cardb' else 1 if location[3] == 'carda' else 0
if path.startswith(self._main_prefix): if self._main_prefix and path.startswith(self._main_prefix):
name = path.replace(self._main_prefix, '') name = path.replace(self._main_prefix, '')
elif path.startswith(self._card_a_prefix): elif self._card_a_prefix and path.startswith(self._card_a_prefix):
name = path.replace(self._card_a_prefix, '') name = path.replace(self._card_a_prefix, '')
elif path.startswith(self._card_b_prefix): elif self._card_b_prefix and path.startswith(self._card_b_prefix):
name = path.replace(self._card_b_prefix, '') name = path.replace(self._card_b_prefix, '')
name = name.replace('\\', '/') name = name.replace('\\', '/')