diff --git a/bootstrapvz/base/fs/partitions/base.py b/bootstrapvz/base/fs/partitions/base.py index 849dc20..a52a68a 100644 --- a/bootstrapvz/base/fs/partitions/base.py +++ b/bootstrapvz/base/fs/partitions/base.py @@ -52,9 +52,8 @@ class BasePartition(AbstractPartition): if self.previous is None: # Partitions are 1 indexed return 1 - else: - # Recursive call to the previous partition, walking up the chain... - return self.previous.get_index() + 1 + # Recursive call to the previous partition, walking up the chain... + return self.previous.get_index() + 1 def get_start(self): """Gets the starting byte of this partition @@ -64,8 +63,7 @@ class BasePartition(AbstractPartition): """ if self.previous is None: return Sectors(0, self.size.sector_size) - else: - return self.previous.get_end() + return self.previous.get_end() def map(self, device_path): """Maps the partition to a device_path diff --git a/bootstrapvz/base/pkg/packagelist.py b/bootstrapvz/base/pkg/packagelist.py index bd50e2b..6aafe4e 100644 --- a/bootstrapvz/base/pkg/packagelist.py +++ b/bootstrapvz/base/pkg/packagelist.py @@ -22,8 +22,7 @@ class PackageList(object): """ if self.target is None: return self.name - else: - return self.name + '/' + self.target + return self.name + '/' + self.target class Local(object): """A local package diff --git a/bootstrapvz/remote/build_servers/__init__.py b/bootstrapvz/remote/build_servers/__init__.py index 8865558..c33e38f 100644 --- a/bootstrapvz/remote/build_servers/__init__.py +++ b/bootstrapvz/remote/build_servers/__init__.py @@ -25,12 +25,13 @@ def pick_build_server(build_servers, manifest, preferences={}): for name, settings in build_servers.iteritems(): if not matches(name, settings): continue - if settings['type'] == 'local': + if settings['type'] == 'local': # pylint: disable=no-else-return from .local import LocalBuildServer return LocalBuildServer(name, settings) else: from .remote import RemoteBuildServer return RemoteBuildServer(name, settings) + raise Exception('Unable to find a build server that matches your preferences.')