~vila/uci-engine/rtfd

« back to all changes in this revision

Viewing changes to branch-source-builder/cupstream2distro/utils.py

  • Committer: francis.ginther@canonical.com
  • Date: 2014-01-31 17:06:36 UTC
  • mto: This revision was merged to the branch mainline in revision 233.
  • Revision ID: francis.ginther@canonical.com-20140131170636-iwe5o3046phdydo3
Adds dput and ppa watch functionality to the branch source builder.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
# Copyright (C) 2013 Canonical
 
3
#
 
4
# Authors:
 
5
#  Didier Roche
 
6
#
 
7
# This program is free software; you can redistribute it and/or modify it under
 
8
# the terms of the GNU General Public License as published by the Free Software
 
9
# Foundation; version 3.
 
10
#
 
11
# This program is distributed in the hope that it will be useful, but WITHOUT
 
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
13
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 
14
# details.
 
15
#
 
16
# You should have received a copy of the GNU General Public License along with
 
17
# this program; if not, write to the Free Software Foundation, Inc.,
 
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
19
 
 
20
from contextlib import contextmanager
 
21
 
 
22
 
 
23
# this is stolen from python 3.4 :)
 
24
@contextmanager
 
25
def ignored(*exceptions):
 
26
    try:
 
27
        yield
 
28
    except exceptions:
 
29
        pass