Giter Club home page Giter Club logo

Comments (5)

natewalck avatar natewalck commented on July 3, 2024

From [email protected] on November 12, 2010 06:24:48

You actually get different behavior if you run makepkginfo as root. In any case, this should cause makepkginfo to fail since we don't know the actual value of RestartAction.

from munki.

natewalck avatar natewalck commented on July 3, 2024

From [email protected] on November 12, 2010 07:12:49

Quick fix commited as r911 , but there are a few problems that need to be addressed:

  • Encoding of subprocess.Popen output needs to be handled. I hardcoded UTF-8 here, but it might be a good idea to wrap Popen in a function that actually checks what the correct encoding is.
  • Popen is called in a lot of places without checking the returncode.
  • Error handling in munki is very fragmented. Sometimes exceptions are raised, and sometimes None, -1, or False is returned. I think returning None is the correct option here, but I can't be sure.

from munki.

natewalck avatar natewalck commented on July 3, 2024

From [email protected] on November 12, 2010 08:28:59

"* Encoding of subprocess.Popen output needs to be handled. I hardcoded UTF-8 here, but it might be a good idea to wrap Popen in a function that actually checks what the correct encoding is."

My ignorance is showing here -- I have no idea what would be involved here.

"* Popen is called in a lot of places without checking the returncode.

  • Error handling in munki is very fragmented. Sometimes exceptions are raised, and sometimes None, -1, or False is returned."

All true. Patches welcome to clean things up.

from munki.

natewalck avatar natewalck commented on July 3, 2024

From [email protected] on November 12, 2010 09:57:01

I think

out, err = [s.decode(locale.getpreferredencoding()) for s in proc.communicate()]

does the trick. This would require testing on a lot of different locales, so maybe it's a good idea to wait until after the release of 0.7.0.

As for error handling, I'm afraid I'd break more than I'd fix.

from munki.

natewalck avatar natewalck commented on July 3, 2024

From [email protected] on December 02, 2010 13:43:53

Marking as fixed because the primary issue as been addressed. We can open a general unicode issue if needed to address the the remaining issues

Status: Fixed

from munki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.