Permalink
Browse files

use Object#ignoring:do: in Fancy::Packages::List#packages

  • Loading branch information...
1 parent 43d4bcf commit d7138655e02bba0b89c9e64744148a09c9021357 @bakkdoor committed Nov 14, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/package/list.fy
View
@@ -11,7 +11,8 @@ class Fancy Package {
def packages {
packages = []
- try {
+ # ignore file not found, as no packages might have been installed yet.
+ ignoring: IOError do: {
File open: @package_list_file modes: ['read] with: |f| {
f readlines each: |l| {
match l {
@@ -20,8 +21,6 @@ class Fancy Package {
}
}
}
- } catch IOError => e {
- # ignore file not found, as no packages might have been installed yet.
}
packages
}

0 comments on commit d713865

Please sign in to comment.