[rygel] media-export: Remove redundant try/catch
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Remove redundant try/catch
- Date: Tue, 15 Sep 2009 15:00:58 +0000 (UTC)
commit 96899f6cded3dd479a201a6d446c03e503fe0f40
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Sep 15 17:50:37 2009 +0300
media-export: Remove redundant try/catch
.../rygel-media-export-root-container.vala | 33 +++++++++-----------
1 files changed, 15 insertions(+), 18 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-root-container.vala b/src/plugins/media-export/rygel-media-export-root-container.vala
index 5a6d739..6663abc 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -123,31 +123,28 @@ public class Rygel.MediaExportRootContainer : Rygel.MediaDBContainer {
ids = new ArrayList<string>();
}
- try {
- var uris = get_uris ();
- foreach (var uri in uris) {
- var file = File.new_for_commandline_arg (uri);
- if (file.query_exists (null)) {
- var id = Checksum.compute_for_string (ChecksumType.MD5,
- file.get_uri ());
- ids.remove (id);
- this.harvest (file);
- }
+ var uris = get_uris ();
+ foreach (var uri in uris) {
+ var file = File.new_for_commandline_arg (uri);
+ if (file.query_exists (null)) {
+ var id = Checksum.compute_for_string (ChecksumType.MD5,
+ file.get_uri ());
+ ids.remove (id);
+ this.harvest (file);
}
- foreach (var id in ids) {
- debug ("Id %s no longer in config, deleting...",
- id);
+ }
+
+ foreach (var id in ids) {
+ debug ("Id %s no longer in config, deleting...",
+ id);
try {
this.media_db.delete_by_id (id);
} catch (MediaDBError e) {
warning ("Failed to remove entry: %s", e.message);
}
- }
- this.updated ();
- } catch (MediaDBError e) {
- warning ("Failed to get children for root container: %s",
- e.message);
}
+
+ this.updated ();
}
private void on_file_harvested (File file) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]