[master 2/2] Deprecate some little-used devicetree lookup methods.

mulkieran installerbot-noreply at redhat.com
Fri Jun 19 12:31:29 UTC 2015


It's probably worth it to have a decorator, like:

```
def deprecate_method(func):

   @wraps(func)
    def the_func(*args, **kwargs):
        """ generate a warning message for a deprecated function, then call the function """
        warnings.warn("%s will be removed in a future version" % func.__name__, DeprecationWarning)
        return func(*args, **kwargs)

  return the_func
```

in storage_log module and use that for getting the warnings into the deprecated methods.





-- 
To view this comment on github, visit https://github.com/dwlehman/blivet/commit/d2ce0e6a0832fedb1332d4844275fdbe9fa4e016#commitcomment-11766765


More information about the anaconda-patches mailing list